<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri= "http://java.sun.com/jsp/jstl/core" prefix= "c" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>编辑银行理财产品</title>

<link href="${pageContext.request.contextPath }/admin/login/css/mainstyle.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/admin/login/css/common.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="${pageContext.request.contextPath }/util/datepicker47/WdatePicker.js"></script>

<script type="text/javascript" src="${pageContext.request.contextPath }/admin/login/js/common.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/admin/login/js/product_bank_form.js"></script>

</head>
<body>
  <div class="rrcc" id="RightBox">
    <div class="right" id="li010">
      <div class="right01"><img src="${pageContext.request.contextPath }/admin/login/images/main/04.gif" /> 银行理财产品管理 &gt; <span>编辑银行理财产品</span></div>
      
      <div class="primary">
        <table>
          <tr>
            <th>编辑银行理财产品</th>
            <th></th>
          </tr>
        </table>
        <br/>
        
        <form action="${pageContext.request.contextPath }/admin/productbank/bankProductEdit.do?m=edit" 
          method="post" name="bankProductForm" id="bankProductForm">
        <input type="hidden" name="id" value="${bankProductDetail.id }" />
        <input type="hidden" name="productTypeId" value="${productBankForm.productTypeId }" />
        <table>
          <tr>
            <td width="180px" align="right">产品名称:</td>
            <td>
              <textarea name="productName" id="productName" rows="3" cols="60"
                onfocus="productNameFocus('productNameCol', 'productNameDesc')"
                onblur="productNameBlur(this, 'productNameCol', 'productNameDesc')" 
              >${bankProductDetail.productName }</textarea>
            </td>
            <td><font color="red">*</font></td>
            <td id="productNameCol">
              <span id="productNameDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">发行银行:</td>
            <td>
              <input type="text" name="bank" id="bank" 
                value="${bankProductDetail.bank }"
                onfocus="bankFocus('bankCol', 'bankDesc')"
                onblur="bankBlur(this, 'bankCol', 'bankDesc')" />
            </td>
            <td><font color="red">*</font></td>
            <td id="bankCol">
              <span id="bankDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">币种:</td>
            <td>
              <input type="text" name="currency" id="currency" 
                value="${bankProductDetail.currency }"
                onfocus="currencyFocus('currencyCol', 'currencyDesc')"
                onblur="currencyBlur(this, 'currencyCol', 'currencyDesc')" />
            </td>
            <td><font color="red">*</font></td>
            <td id="currencyCol">
              <span id="currencyDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">委托管理期:</td>
            <td>
              <input type="text" name="timeLimit" id="timeLimit" 
                value="${bankProductDetail.timeLimit }"
                onfocus="timeLimitFocus('timeLimitCol', 'timeLimitDesc')"
                onblur="timeLimitBlur(this, 'timeLimitCol', 'timeLimitDesc')" />天
            </td>
            <td><font color="red">*</font></td>
            <td id="timeLimitCol">
              <span id="timeLimitDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">收益起计日:</td>
            <td>
              <input type="text" name="earningsStartDate" id="earningsStartDate" 
                value="${bankProductDetail.earningsStartDate }"
                onfocus="WdatePicker({minDate:'%y-%M-%d'})"/>
            </td>
            <td></td>
            <td id="earningsStartDateCol">
              <span id="earningsStartDateDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">销售起始日期:</td>
            <td>
              <input type="text" name="startDate" id="startDate" 
                value="${bankProductDetail.startDate }"
                onfocus="WdatePicker({minDate:'%y-%M-%d'})"/>
            </td>
            <td></td>
            <td id="startDateCol">
              <span id="startDateDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">销售终止日期:</td>
            <td>
              <input type="text" name="endDate" id="endDate" 
                value="${bankProductDetail.endDate }"
                onfocus="WdatePicker({minDate:'#F{$dp.$D(\'startDate\')}'})"/>
            </td>
            <td></td>
            <td id="endDateCol">
              <span id="endDateDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">付息周期:</td>
            <td>
              <input type="text" name="paymentCycle" id="paymentCycle" 
                value="${bankProductDetail.paymentCycle }"
                onfocus="paymentCycleFocus('paymentCycleCol', 'paymentCycleDesc')"
                onblur="paymentCycleBlur(this, 'paymentCycleCol', 'paymentCycleDesc')" />天
            </td>
            <td><font color="red">*</font></td>
            <td id="paymentCycleCol">
              <span id="paymentCycleDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">预期最高年化收益率（%）:</td>
            <td>
              <input type="text" name="expectedProfit" id="expectedProfit" 
                value="${bankProductDetail.expectedProfit }"
                onfocus="expectedProfitFocus('expectedProfitCol', 'expectedProfitDesc')"
                onblur="expectedProfitBlur(this, 'expectedProfitCol', 'expectedProfitDesc')" />%
            </td>
            <td><font color="red">*</font></td>
            <td id="expectedProfitCol">
              <span id="expectedProfitDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">产品类型:</td>
            <td>
              <input type="text" name="productType" id="productType" 
                value="${bankProductDetail.productType }"
                onfocus="productTypeFocus('productTypeCol', 'productTypeDesc')"
                onblur="productTypeBlur(this, 'productTypeCol', 'productTypeDesc')" />
            </td>
            <td><font color="red">*</font></td>
            <td id="productTypeCol">
              <span id="productTypeDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">委托起始金额:</td>
            <td>
              <input type="text" name="startAmount" id="startAmount" 
                value="${bankProductDetail.startAmount }"
                onfocus="startAmountFocus('startAmountCol', 'startAmountDesc')"
                onblur="startAmountBlur(this, 'startAmountCol', 'startAmountDesc')" />万元
            </td>
            <td><font color="red">*</font></td>
            <td id="startAmountCol">
              <span id="startAmountDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">收益类型:</td>
            <td>
              <input type="text" name="earningsType" id="earningsType" 
                value="${bankProductDetail.earningsType }"
                onfocus="earningsTypeFocus('earningsTypeCol', 'earningsTypeDesc')"
                onblur="earningsTypeBlur(this, 'earningsTypeCol', 'earningsTypeDesc')" />
            </td>
            <td><font color="red">*</font></td>
            <td id="earningsTypeCol">
              <span id="earningsTypeDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">发售地区:</td>
            <td>
              <input type="text" name="placeArea" id="placeArea" 
                value="${bankProductDetail.placeArea }"
                onfocus="placeAreaFocus('placeAreaCol', 'placeAreaDesc')"
                onblur="placeAreaBlur(this, 'placeAreaCol', 'placeAreaDesc')" />
            </td>
            <td><font color="red">*</font></td>
            <td id="placeAreaCol">
              <span id="placeAreaDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">递增单位（元）:</td>
            <td>
              <input type="text" name="incrementBy" id="incrementBy" 
                value="${bankProductDetail.incrementBy }"
                onfocus="incrementByFocus('incrementByCol', 'incrementByDesc')"
                onblur="incrementByBlur(this, 'incrementByCol', 'incrementByDesc')" />元
            </td>
            <td><font color="red">*</font></td>
            <td id="incrementByCol">
              <span id="incrementByDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">产品管理费（元）:</td>
            <td>
              <input type="text" name="fees" id="fees" 
                value="${bankProductDetail.fees }"
                onfocus="feesFocus('feesCol', 'feesDesc')"
                onblur="feesBlur(this, 'feesCol', 'feesDesc')" />元
            </td>
            <td><font color="red">*</font></td>
            <td id="feesCol">
              <span id="feesDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">是否保本:</td>
            <td>
              <select name="breakEven">
                <option value="0" <c:if test="${bankProductDetail.breakEven eq 0 }">selected</c:if>>否</option>
                <option value="1" <c:if test="${bankProductDetail.breakEven eq 1 }">selected</c:if>>是</option>
              </select>
            </td>
            <td><font color="red">*</font></td>
            <td></td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">在售状态:</td>
            <td>
              <select name="placeStatus">
                <option value="0" <c:if test="${bankProductDetail.placeStatus eq 0 }">selected</c:if>>未开始销售</option>
                <option value="1" <c:if test="${bankProductDetail.placeStatus eq 1 }">selected</c:if>>正在销售中</option>
                <option value="2" <c:if test="${bankProductDetail.placeStatus eq 2 }">selected</c:if>>已结束销售</option>
              </select>
            </td>
            <td><font color="red">*</font></td>
            <td></td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">提前终止条件:</td>
            <td>
              <textarea name="earlyTermCond" id="earlyTermCond" rows="5" cols="60"
                onfocus="earlyTermCondFocus('earlyTermCondCol', 'earlyTermCondDesc')"
                onblur="earlyTermCondBlur(this, 'earlyTermCondCol', 'earlyTermCondDesc')" 
              >${bankProductDetail.earlyTermCond }</textarea>
            </td>
            <td><font color="red"></font></td>
            <td id="earlyTermCondCol">
              <span id="earlyTermCondDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">产品说明:</td>
            <td>
              <textarea name="productDesc" id="productDesc" rows="10" cols="60"
                onfocus="productDescFocus('productDescCol', 'productDescDesc')"
                onblur="productDescBlur(this, 'productDescCol', 'productDescDesc')" 
              >${bankProductDetail.productDesc }</textarea>
            </td>
            <td><font color="red"></font></td>
            <td id="productDescCol">
              <span id="productDescDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">收益率说明:</td>
            <td>
              <textarea name="eariningsDesc" id="eariningsDesc" rows="10" cols="60"
                onfocus="eariningsDescFocus('eariningsDescCol', 'eariningsDescDesc')"
                onblur="eariningsDescBlur(this, 'eariningsDescCol', 'eariningsDescDesc')" 
              >${bankProductDetail.eariningsDesc }</textarea>
            </td>
            <td><font color="red"></font></td>
            <td id="eariningsDescCol">
              <span id="eariningsDescDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">内容状态:</td>
            <td>
              <select name="status">
                <option value="1" <c:if test="${bankProductDetail.status eq 1 }">selected</c:if>>发布</option>
                <option value="0" <c:if test="${bankProductDetail.status eq 0 }">selected</c:if>>草稿</option>
              </select>
            </td>
            <td><font color="red">*</font></td>
            <td></td>
          </tr>
          
          <tr height="15px"><td></td><td></td><td></td></tr>
          <tr>
            <td></td>
            <td></td>
            <td></td>
          </tr>
          <tr>
            <td></td>
            <td>
              <input type="button" value="保存" onclick="addBankProductFun()" />
            </td>
            <td></td>
          </tr>
        </table>
        </form>
      </div>
      
    </div>
  </div>
</body>
</html>